package date;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateMethod {
	public static void main(String[] args) {
		Date d=new Date();
		SimpleDateFormat dat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS");
        System.out.println(d.getYear());	
        System.out.println(d.getMonth());	
        System.out.println(d.getDate());	
        System.out.println(d.getHours());	
        System.out.println(d.getMinutes());	
        System.out.println(d.getSeconds());	
        System.out.println(d.toGMTString());	
        System.out.println(d.toLocaleString());	
        SimpleDateFormat dat2=new SimpleDateFormat("M");
        System.out.println(dat2.format(d));
        SimpleDateFormat dat3=new SimpleDateFormat("D");
        System.out.println(dat3.format(d));
        SimpleDateFormat dat4=new SimpleDateFormat("F");
        System.out.println(dat4.format(d));
        
	}

}
